Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle® Ultra Search Java API Reference 10g Release 2 (10.2) B14221-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ultrasearch.query
Interface Query

All Known Implementing Classes:
  AllOf, And, AnyOf, Between, Contains, CtxContains, Equals, From, GreaterThan, LessThan, Or, QueryTemplate

public interface Query

A search criteria or constraint.

Queries can be combined to form more complicated queries, using And/Or query.

Since:
  9.0.2
See Also:
  `And`, `Or`

Method Summary
`java.lang.String` | `compile()` A query must be able to compile itself into some equivalent Oracle Text query string.
`java.lang.String` | `compileForCount()` A query must be able to compile itself into some equivalent Oracle Text query string.

Method Detail

### compile

    public java.lang.String compile()

  A query must be able to compile itself into some equivalent Oracle Text query string. The query string returned is used by the 'CONTAINS' Text operator. Subclasses need to override this method with their own implementation.
  Returns:
    a valid Text 'CONTAINS' query string, not null.

### compileForCount

    public java.lang.String compileForCount()

  A query must be able to compile itself into some equivalent Oracle Text query string. The query string returned is used by the 'CTX_QUERY.COUNT_HITS' Text API. Subclasses need to override this method with their own implementation. NOTE: This method is needed because Text queries can be reduced for faster execution of 'COUNT_HITS'. For example, '(({A} & {B})*2, {A} | {B})' is equivalent to '({A} | {B})' for hit counting purposes, and the later is faster to execute. Since this is an optimization, it is the implementation's responsibility to ensure the query string returned finds the same number of hits as the query string returned by compile(). A trivial, albeit slow implementation of compileForCount() can return the same string as compile().
  Returns:
    a valid Text query string, not null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle® Ultra Search Java API Reference 10g Release 2 (10.2) B14221-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003,2005, Oracle. All Rights Reserved.